<template>
    <van-nav-bar
  title="标题"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
<van-skeleton title :row="3" />
    <div v-for="item in searchApiData">
        <router-link :to="{name:'dd',params:{goods_id:item.goods_id}}">
<van-card
  :price="item.goods_price"
  :title="item.goods_name"
  :thumb="item.goods_big_logo?item.goods_big_logo:'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'"
/>
</router-link>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { searchApi } from '@/api/api';
import { useRoute } from 'vue-router';
let route=useRoute()
let searchApiData=ref([])
searchApi(route.params.query).then(res=>{
    searchApiData.value=res.data.message.goods
    console.log(res);
    
})
const onClickLeft = () => history.back();
</script>

<style lang="scss" scoped>

</style>